const axios = function (options) {
    const baseURL = 'http://113.105.248.75:8081'
    const { url, data} = options
    return new Promise((resolve, reject) => {
        if (!url) {
            reject('请先传入 url')
        }
        const xhr = new XMLHttpRequest()
        xhr.open('get', baseURL + url)
        // xhr.setRequestHeader("Authorization", 'token');  //设置请求头
        xhr.onload = function () {
            var res = JSON.parse(xhr.responseText)
            resolve(res)
        }
        xhr.send()
    });
}